package com.hejielife.guardedsuspension3;

/**
 * 2019年8月2日 上午11:38:29
 * 
 * @author hejielife
 * @despribe 可以停下的通话
 */
public class Main {
	public static void main(String[] args) {
		// start
		RequestQueue requestQueue = new RequestQueue();
		Thread alice = new ClientThread(requestQueue, "Alice", 314159L);
		Thread bobby = new ServerThread(requestQueue, "Bobby", 265358L);
		alice.start();
		bobby.start();
		// sleep
		try {
			Thread.sleep(10000);
		} catch (InterruptedException e) {
		}
		// end
		System.out.println("***** calling interrupt *****");
		alice.interrupt();
		bobby.interrupt();
	}
}
